package com.googlecode.dgwt.client.dojo.exception;

import com.googlecode.dgwt.client.dojo.Dojo;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class DojoException extends Exception {

    private static final long serialVersionUID = 1L;

    public DojoException() {
        super();
    }

    public DojoException(String message, Throwable cause) {
        super(message, cause);
    }

    public DojoException(String message) {
        super(message);
    }

    public DojoException(Throwable cause) {
        super(cause);
    }

    public DojoException(Object component, String message) {
        super(component == null ? "" : Dojo.reflect.getSimpleName(component.getClass()) + ": " + message);
    }

    public DojoException(Object component, String message, Throwable cause) {
        super(component == null ? "" : Dojo.reflect.getSimpleName(component.getClass()) + ": " + message, cause);
    }

}
